<%@page import="java.io.File"%>
<jsp:include page="../layouts/header.jsp" />
<h3>Download</h3>
<% File[] subfiles = (File[]) request.getAttribute("subfiles"); %>
<p>
	<% if (null != subfiles) {
		for(int i=0 ; i<subfiles.length; i++){ %>
			<p><%=subfiles[i].getName() %></p>
			<%if (subfiles[i].isDirectory()) { %>
				<p>Explore this directory</p>
			<% }else{ %>
				<p><a href="<%=request.getRequestURI()%>" download="<%=subfiles[i].getName() %>">Download this file</a></p>
			<%} %>
		<%} %>
	<%} %>
</p>
<jsp:include page="../layouts/footer.jsp" />